﻿<script id="messageFileLink" type="text/x-jquery-tmpl">
    <div dir="ltr">
        <div contenteditable="false" data-fileid="${id}" class="mailmessage-filelink" style="width: 350px; height: 27px; max-height: 27px; 
            background-color: #f2f2f2; color: #333; font-family: arial; font-style:normal; font-weight: normal; font-size: 12px; cursor: default; margin-bottom: 10px;">
            <a href="${fileUrl}" title="${fileName + ext}" target="_blank" data-fileid="${id}" class="mailmessage-filelink-link" style="display: inline-block; 
                overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; border: none; width: 310px; 
                cursor: pointer; height: 25px; color: #333;">
                <img style="vertical-align: bottom; border: none; cursor: pointer; margin: 3px 0 0 3px; width: 21px; height: 21px; display: inline-block; float: left;" src="${TMMail.getFileIconByExt(ext)}" />
                <span style="display: inline-block; margin: 7px 0 0 3px;">
                    <span style="max-width: 260px; text-decoration:none; display:inline-block;" class="file-name">${fileName}</span>
                    <span style="text-decoration:none; color:#a2a2a2; display:inline-block;">${ext}</span>
                </span>
            </a>
            <div class="delete-btn"></div>
        </div>
    </div>
</script>

<script id="filesCannotBeAttachedAsLinksTmpl" type="text/x-jquery-tmpl">
    <div id="filesCannotBeAttachedAsLinksBox">
        
        <div class="warning-box"></div>
        <div class="description-box">
            <div class="header">${ASC.Mail.Resources.MailResource.FilesCannotBeAttachedAsLinks_Header}</div>
            <div>{{html ASC.Mail.Resources.FilesCannotBeAttachedAsLinks}}</div>
        </div>
        
        <div class="buttons">
            <button class="button middle blue" type="button" onclick="window.AttachmentManager.CopyFilesToMyDocumentsAndInsertFileLinksToMessage();">
                ${ASC.Mail.Resources.MailResource.CopyFilesToMyDocumentsBtn}
            </button>
            <button class="button middle gray cancel" type="button" onclick="window.AttachmentManager.CancelCopyingFilesToMyDocuments()">
                ${ASC.Mail.Resources.MailScriptResource.CancelBtnLabel}
            </button>
        </div>
    </div>
</script>

<script id="sharingSettingForFileLinksTmpl" type="text/x-jquery-tmpl">
    <div id="sharingSettingForFileLinksTmplBox">
        <div class="header">${ASC.Mail.Resources.MailResource.SharingSettingForFileLinks_Header}</div>
        
        <div class="radiobox-switcher">
            <select id="shareFileLinksAccessSelector">
                <option value="${ASC.Files.Constants.AceStatusEnum.ReadWrite}">${ASC.Mail.Resources.MailResource.FullAccess}</option>
                <option value="${ASC.Files.Constants.AceStatusEnum.Review}">${ASC.Mail.Resources.MailResource.Review}</option>
                <option value="${ASC.Files.Constants.AceStatusEnum.FillForms}">${ASC.Mail.Resources.MailResource.FillForms}</option>
                <option value="${ASC.Files.Constants.AceStatusEnum.Comment}">${ASC.Mail.Resources.MailResource.Comment}</option>
                <option value="${ASC.Files.Constants.AceStatusEnum.Read}" selected >${ASC.Mail.Resources.MailResource.ReadOnly}</option>
            </select>
        </div>

        <div class="description">${ASC.Mail.Resources.MailResource.SharingSettingForFileLinks_Body}</div>
        
        <div class="buttons">
            <button class="button middle blue" type="button" onclick="window.messagePage.sendAction(null, true); window.popup.hide();">
                ${ASC.Mail.Resources.MailResource.SaveAndSendMessageBtn}
            </button>
            <button class="button middle gray cancel" type="button">
                ${ASC.Mail.Resources.MailScriptResource.CancelBtnLabel}
            </button>
        </div>
    </div>
</script>